.ios {
  .toolbar-pane {
    user-select: none;
  }
  .toolbar-pane,
  .toolbar .left,
  .toolbar .right {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 1;
    border-radius: 32px;
    .ios-glass();
  }
  .toolbar {
    .left {
      margin-right: auto;
    }
    .right {
      margin-left: auto;
    }
    .left:empty,
    .right:empty {
      display: none;
    }

    a:is(.icon-only, :has(i:only-child), :has(svg:only-child)) {
      display: flex;
      justify-content: center;
      align-items: center;
      margin: 0;
      min-width: 48px;
      min-height: 48px;
      padding: 0;
    }
    .link {
      padding: 0 12px;
      height: 100%;
    }
    &::before,
    &::after {
      pointer-events: none;
      content: '';
      position: absolute;
      inset: 0;
    }
    &::before {
      backdrop-filter: blur(2px);
      mask-image: linear-gradient(
        to top,
        black calc(50% + var(--f7-safe-area-bottom, 0px)),
        transparent 100%
      );
    }
    &::after {
      background-image: linear-gradient(
        to top,
        var(--f7-toolbar-bg-color, var(--f7-bars-bg-color)) var(--f7-safe-area-bottom, 0px),
        transparent 100%
      );
    }
    &.toolbar-bottom,
    &.messagebar {
      &::before,
      &::after {
        top: -16px;
      }
      .toolbar-inner {
        padding-bottom: 16px;
      }
    }
    &.toolbar-top,
    &:not(.toolbar-bottom, .toolbar-top, .messagebar) {
      &::before {
        mask-image: linear-gradient(
          to bottom,
          black calc(50% + var(--f7-safe-area-top, 0px)),
          transparent 100%
        );
      }
      &::after {
        background-image: linear-gradient(
          to bottom,
          var(--f7-toolbar-bg-color, var(--f7-bars-bg-color)) var(--f7-safe-area-top, 0px),
          transparent 100%
        );
      }
      &::before,
      &::after {
        bottom: -16px;
      }
      .toolbar-inner {
        padding-top: 16px;
      }
    }
  }
  .navbar ~ .toolbar-top {
    &::before,
    &::after {
      display: none;
    }
  }
  .toolbar-inner {
    justify-content: center;
    overflow: visible;
    gap: 16px;
  }
  .tabbar-scrollable .toolbar-pane {
    .scrollable();
    .no-scrollbar();
    justify-content: flex-start;
  }
  .tabbar:not(.tabbar-scrollable) {
    touch-action: none;
  }
  .tabbar-icons {
    .tab-link,
    .link {
      padding-top: 4px;
      padding-bottom: 4px;
      i + span {
        margin: 0;
        margin-top: 4px;
      }
    }
  }
  @media (max-width: 767px) {
    .tabbar .toolbar-pane {
      width: 100%;
    }
  }
  @media (min-width: 768px) {
    .tabbar .tab-link {
      padding-left: 16px;
      padding-right: 16px;
      min-width: 96px;
    }
  }

  // Scrollable
  .tabbar-scrollable {
    .toolbar-inner {
      justify-content: flex-start;
    }
    .tab-link,
    .link {
      padding: 0 8px;
    }
  }
  .tab-link-highlight {
    position: absolute;
    height: 100%;
    top: 0;
    transition-duration: 300ms;
    border-radius: inherit;
    .ltr({
      left: 0;
    });
    .rtl({
      right: 0;
    });
    &::before,
    &::after {
      content: '';
      position: absolute;
      inset: 4px;
      border-radius: inherit;
      transition-duration: 300ms;
    }
    &::before {
      background-color: var(--f7-tabbar-link-highlight-bg-color);
    }
    &::after {
      opacity: 0;
      box-shadow: var(--f7-glass-shadow-thumb);
      background-color: var(--f7-tabbar-link-highlight-active-bg-color);
    }
  }
  .tab-link-highlight-pressed {
    &::before {
      opacity: 0;
    }
    &::after {
      opacity: 1;
    }
    &::before,
    &::after {
      scale: 1.4;
    }
  }
}
